Fix typos and improve documentation - #1
Conversation
ZHENRZHANG
commented
Oct 1, 2025
- Rename contants.py to constants.py (fix typo)
- Update import statement in deprecation.py
- Fix command name in documentation (mc3d-source -> mc3d)
- Fix typo 'environmens' -> 'environments' in developer.md
- Fix duplicate command in pre-commit section
- Remove useless len() call in deprecation.py
- Rename contants.py to constants.py (fix typo) - Update import statement in deprecation.py - Fix command name in documentation (mc3d-source -> mc3d) - Fix typo 'environmens' -> 'environments' in developer.md - Fix duplicate command in pre-commit section - Remove useless len() call in deprecation.py
mbercx
left a comment
There was a problem hiding this comment.
Thanks @ZHENRZHANG! Must say I'm a little surprised to see a PR here, but glad to have the contribution.
I'm afraid you caught me with my pants down. I still had some local commits that weren't pushed yet, so indeed some of the documentation was incorrect. The code is also still largely untested for now, so here be dragons.
In #2 I update the package to the latest template version. Also will be doing some updates there shortly. After that you'll probably have some merge conflicts. Happy to clean that up for you and get the other fixes in.
|
|
||
| We use [Hatch](https://hatch.pypa.io/latest) to set up environments and scripts for most developer tasks. | ||
| To see a table of the available environmens and their scripts, run: | ||
| To see a table of the available environments and their scripts, run: |
There was a problem hiding this comment.
Thanks! This has been fixed in my template package here: mbercx/python-copier@3a3ee25
I've added you as a co-author on fd58efa to properly attribute your contribution.
| Or run them via: | ||
|
|
||
| hatch run precommit:install | ||
| hatch run precommit:run |
There was a problem hiding this comment.
Same as above, fixed in mbercx/python-copier@3a3ee25.
| 1. Do a full import of all the raw `CifData`. | ||
| 1. Run the `CifCleanWorkChain` for all of them. | ||
| 3. "Curate" the structures with `mc3d-source curate`. | ||
| 3. "Curate" the structures with `mc3d curate`. |
There was a problem hiding this comment.
Apologies, I had changed this locally, but hadn't pushed yet. I adapted this command to mc3d-source, since we'll most likely have other "mc3d" commands in the future, see 4657902.
|
|
||
| ``` | ||
| mc3d-source --help | ||
| mc3d --help |
| from rich import print as rprint | ||
|
|
||
| from mc3d_source.contants import SourceDeprecation | ||
| from mc3d_source.constants import SourceDeprecation |
There was a problem hiding this comment.
Hah! Seems I actually made a typo in the module name, and then tab-completed the import here. Thanks for spotting, will fix this in a separate commit for the module name, if that's ok?
| rprint(f"[bold yellow]Report:[/] Found {len(old_source_were_fine)} structures where the old source was fine.") | ||
|
|
||
| new_sources_taken = new_sources.difference(old_source_were_fine) | ||
| len(new_sources_taken) |
There was a problem hiding this comment.
This one most certainly should go. :)